docs(db): telemetry retention is already active in pg_cron — retract scheduled-job proposal#1011
Conversation
…scheduled-job proposal Fresh read-only cron.job verification (2026-07-20) matches the PIA §6 record exactly: rag_queries 30d (jobid 11), rag_retrieval_logs 90d (jobid 12), rag_query_misses 90d (jobid 13), response cache hourly bounded (jobid 16) - all active. The just-merged 'open decision' section's premise (manual and unbounded) was wrong, and the proposed weekly GitHub-side purge would have duplicated pg_cron with window drift. Section rewritten to the resolved state; purge:query-logs documented as the manual owner-scoped tool, not the retention mechanism. No live mutations - the single cron.job SELECT was the only access. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe documentation records telemetry retention as active through database-level ChangesTelemetry retention documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/branch-review-ledger.md`:
- Line 663: Update the ledger entry for claude/clinical-kb-pwa-review-asi3wb to
replace “see PR head” with the exact reviewed commit SHA. Preserve the existing
restart/base reference and all other verification details, ensuring the SHA
identifies the precise reviewed head.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f8dfd2ef-4722-4185-8d34-2a4ef4c8a5b5
📒 Files selected for processing (2)
docs/branch-review-ledger.mddocs/db-maintenance.md
CodeRabbit review on #1011: the row used the 'see PR head' placeholder; the ledger's skip-unchanged-reviews protocol keys on branch + HEAD SHA, so the row now names 01368ff (content commit) plus the 0144e69 main merge-in. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
Summary
Close-out of the user-authorized "implement your recommendation for all decisions" pass — with a correction instead of a new job. Deeper discovery (PIA §6 + a fresh read-only
cron.jobverification, 2026-07-20) shows telemetry retention is already fully active inside the database via pg_cron:purge-expired-rag-queriespurge-rag-retrieval-logspurge-rag-query-missespurge-rag-response-cacheThe just-merged #1009 "open decision" premise ("retention is currently manual and unbounded") was wrong, and the proposed weekly GitHub-side purge workflow would have duplicated pg_cron with window drift — a 90-day
rag_queriessweep can never delete anything the live 30-day job hasn't already removed. So: nothing was built, and no live mutation was made. This PR rewrites the db-maintenance section to the resolved state, documentspurge:query-logsas the manual owner-scoped tool (not the retention mechanism), and records the retraction in the ledger. Retention windows remain PIA-governed privacy decisions (change via migration + PIA update only).The other two authorized decisions stand as documented no-action: auth percentage connection strategy deferred to the next instance resize; operational unused-index drops not recommended.
Verification
npx prettier --checkon both changed docs — cleannpm run docs:check-links— 1036 repo path references resolveselect … from cron.job(same user-authorized read-only envelope as tonight's advisor sweep); no schema, config, data, or workflow changes anywhereRisk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy) — read-onlycron.jobselect only🤖 Generated with Claude Code
https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
Generated by Claude Code
Summary by CodeRabbit